We continue trying to optimize our the garbage collection process with concurrent algorithms, write barriers and compaction. Concurrent algorithms allow our application to respond to requests intermittently while the GC runs. This reduces app latency (although it also reduces app throughput). Compaction allows efficient memory allocation, but has the downside of stopping the application while objects are moved from one region to another. We discuss the problems, solutions and algorithms to speed up garbage collection here. Part 1: https://youtu.be/ZhbIReLe-r8 0:00 - Agenda 0:41 - Concurrency 1:34 - Lost object problem 2:41 - Defining constraints 3:25 - Solving through Write Barrier 3:49 - Memory Fragmentation 4:51 - G1GC 5:45 - Remembered Set 6:28 - Lost Update problem 7:09 - Solution teaser Final part coming soon! References: Tricolor Algorithm: Knuth, The art of computer programming Generational Hypothesis: https://people.cs.umass.edu/~emery/classes/cmpsci691s-fall2004/papers/p157-ungar.pdf System Design Video Course: https://interviewready.io/ Software Engineering Fundamentals: https://www.youtube.com/playlist?list=PLMCXHnjXnTntYbKsUs6Pj8_BO_8ou4y07 You can follow me on: Instagram: https://www.instagram.com/applepie404/ LinkedIn: https://www.linkedin.com/in/gaurav-sen-56b6a941/ Quora: https://www.quora.com/profile/Gaurav-Sen-6 Twitter: https://twitter.com/gkcs_ #GarbageCollection #JavaGC #JavaGarbageCollection